<%@page import="demo.Customer"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Test Bean dans JSP</title>
</head>
<body>
<%=new java.util.Date() %>
<br>
Bonjour Monsieur 
<%
Customer customer = (Customer)session.getAttribute("cust");
out.println(customer.getName());
%>

(<%=((Customer)session.getAttribute("cust")).getName() %>)
<h2> Liste des clients </h2>
<table border="1">
<tr><th>id</th><th>nom</th><th>pr&eacute;nom</th><th>adresse</th></tr>
<%
 java.util.List<Customer> customers = (java.util.List<Customer>)session.getAttribute("custs");
 for (Customer customr:customers){
	 %>
	 <tr><td><%=customr.getId()%></td><td><%=customr.getName()%></td><td><%=customr.getPrenom()%></td><td><%=customr.getAdresse()%></td></tr>
	 <% 
 }
%>
</table>

</body>
</html>

